local t = LoadFallbackB();

-- Legacy StepMania 4 Function
local function StepsDisplay(pn)
	local function set(self, player)
		self:SetFromGameState( player );
	end

	local t = Def.StepsDisplay {
		InitCommand=cmd(Load,"StepsDisplay",GAMESTATE:GetPlayerState(pn););
	};

	if pn == PLAYER_1 then
		t.CurrentStepsP1ChangedMessageCommand=function(self) set(self, pn); end;
		t.CurrentTrailP1ChangedMessageCommand=function(self) set(self, pn); end;
	else
		t.CurrentStepsP2ChangedMessageCommand=function(self) set(self, pn); end;
		t.CurrentTrailP2ChangedMessageCommand=function(self) set(self, pn); end;
	end

	return t;
end
t[#t+1] = StandardDecorationFromFileOptional("AlternateHelpDisplay","AlternateHelpDisplay");

local function PercentScore(pn)
	local t = LoadFont("Common normal")..{
		InitCommand=cmd(zoom,0.625;shadowlength,1);
		BeginCommand=cmd(playcommand,"Set");
		SetCommand=function(self)
			local SongOrCourse, StepsOrTrail;
			if GAMESTATE:IsCourseMode() then
				SongOrCourse = GAMESTATE:GetCurrentCourse();
				StepsOrTrail = GAMESTATE:GetCurrentTrail(pn);
			else
				SongOrCourse = GAMESTATE:GetCurrentSong();
				StepsOrTrail = GAMESTATE:GetCurrentSteps(pn);
			end;

			local profile, scorelist;
			local text = "";
			if SongOrCourse and StepsOrTrail then
				local st = StepsOrTrail:GetStepsType();
				local diff = StepsOrTrail:GetDifficulty();
				local courseType = GAMESTATE:IsCourseMode() and SongOrCourse:GetCourseType() or nil;
				local cd = GetCustomDifficulty(st, diff, courseType);
				self:diffuse(CustomDifficultyToColor(cd));
				self:shadowcolor(CustomDifficultyToDarkColor(cd));

				if PROFILEMAN:IsPersistentProfile(pn) then
					-- player profile
					profile = PROFILEMAN:GetProfile(pn);
				else
					-- machine profile
					profile = PROFILEMAN:GetMachineProfile();
				end;

				scorelist = profile:GetHighScoreList(SongOrCourse,StepsOrTrail);
				assert(scorelist)
				local scores = scorelist:GetHighScores();
				local topscore = scores[1];
				if topscore then
					text = string.format("%.2f%%", topscore:GetPercentDP()*100.0);
					-- 100% hack
					if text == "100.00%" then
						text = "100.00%";
					end;
				else
					text = string.format("%.2f%%", 0);
				end;
			else
				text = "";
			end;
			self:settext(text);
		end;
		CurrentSongChangedMessageCommand=cmd(playcommand,"Set");
		CurrentCourseChangedMessageCommand=cmd(playcommand,"Set");
	};

	if pn == PLAYER_1 then
		t.CurrentStepsP1ChangedMessageCommand=cmd(playcommand,"Set");
		t.CurrentTrailP1ChangedMessageCommand=cmd(playcommand,"Set");
	else
		t.CurrentStepsP2ChangedMessageCommand=cmd(playcommand,"Set");
		t.CurrentTrailP2ChangedMessageCommand=cmd(playcommand,"Set");
	end

	return t;
end

-- Legacy StepMania 4 Function
for pn in ivalues(PlayerNumber) do
	local MetricsName = "StepsDisplay" .. PlayerNumberToString(pn);
	t[#t+1] = StepsDisplay(pn) .. {
		InitCommand=function(self) self:player(pn); self:name(MetricsName); ActorUtil.LoadAllCommandsAndSetXY(self,Var "LoadingScreen"); end;
		PlayerJoinedMessageCommand=function(self, params)
			if params.Player == pn then
				self:visible(true);
				(cmd(zoom,0;bounceend,0.3;zoom,1))(self);
			end;
		end;
		PlayerUnjoinedMessageCommand=function(self, params)
			if params.Player == pn then
				self:visible(true);
				(cmd(bouncebegin,0.3;zoom,0))(self);
			end;
		end;
	};
	if ShowStandardDecoration("PercentScore"..ToEnumShortString(pn)) then
		t[#t+1] = StandardDecorationFromTable("PercentScore"..ToEnumShortString(pn), PercentScore(pn));
	end;
end


local ut = Def.ActorFrame{
	LoadFont("Common Normal")..{
		Name="songTitle";
		InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y+23;zoom,0;shadowlength,0;);
		OffCommand=cmd(decelerate,0.05;addy,900);
		SetCommand=function(self)
			local song;
			local tit="";
			if GAMESTATE:IsCourseMode() then
				song=GAMESTATE:GetCurrentCourse();
				tit=song:GetDisplayFullTitle();
				
			else
				song=GAMESTATE:GetCurrentSong();
				tit=song:GetDisplayMainTitle();
			end;
			self:maxwidth(SCREEN_WIDTH-80);
			self:settextf("%s",tit);
		end;
	};
	LoadFont("Common Normal")..{
		Name="songArtist";
		InitCommand=cmd(x,SCREEN_CENTER_X+75;y,SCREEN_CENTER_Y-4;zoomy,0.8;shadowlength,0;horizalign,left;);
		OffCommand=cmd(decelerate,0.05;addy,900;);
		SetCommand=function(self)
			local song;
			local sub="";
			local art="";
			if GAMESTATE:IsCourseMode() then
			else
				song=GAMESTATE:GetCurrentSong();
				sub=song:GetDisplaySubTitle();
				art=song:GetDisplayArtist();
				self:settextf("%s\n%s",sub,art);
			end;
		end;
	};
};


--ºq¦±¼ÐÃD§@ªÌ
local function updateTitle(self)
	local upTit = self:GetChild("songTitle");
	local upArt = self:GetChild("songArtist");
	local curSelection = GAMESTATE:GetCurrentSong();
	local curSelCourse = GAMESTATE:GetCurrentCourse();
	upTit:maxwidth(SCREEN_WIDTH-80);
	upArt:maxwidth(140);
	if curSelection or curSelCourse then
		local song;
		local tit="";
		local sub="";
		local art="";
		if GAMESTATE:IsCourseMode() then
			song=GAMESTATE:GetCurrentCourse();
			tit=song:GetDisplayFullTitle();
			upTit:settextf("%s",tit);
			upTit:x(SCREEN_CENTER_X-150);
			--upTit:y(SCREEN_CENTER_Y+28);
		else
			song=GAMESTATE:GetCurrentSong();
			tit=song:GetDisplayMainTitle();
			sub=song:GetDisplaySubTitle();
			art=song:GetDisplayArtist();
			upTit:settextf("%s",tit..sub);
		end;
		upTit:diffuse(color("1,1,1,1"));
		upTit:strokecolor(Color("White"));
		
		upArt:settextf("\n%s",art);
		upArt:diffuse(color("1,1,1,1"));
		upArt:strokecolor(Color("White"));
	else
	--	upTit:diffuse(Color("Orange"));
	--	upTit:strokecolor(color("0.30,0.15,0.0,0.9"));
	--	upTit:settextf("%s",GAMESTATE:GetExpandedSectionName());
		upTit:settext("");
		upArt:settext("");
	end;
end;

ut.InitCommand=cmd(SetUpdateFunction,updateTitle);


t[#t+1] = ut;


t[#t+1] = StandardDecorationFromFileOptional( "GrooveRadar", "GrooveRadar" );

t[#t+1] = StandardDecorationFromFileOptional("BannerFrame","BannerFrame");
t[#t+1] = StandardDecorationFromFileOptional("PaneDisplayFrameP1","PaneDisplayFrame");
t[#t+1] = StandardDecorationFromFileOptional("PaneDisplayFrameP2","PaneDisplayFrame");
t[#t+1] = StandardDecorationFromFileOptional("PaneDisplayTextP1","PaneDisplayTextP1");
t[#t+1] = StandardDecorationFromFileOptional("PaneDisplayTextP2","PaneDisplayTextP2");
t[#t+1] = StandardDecorationFromFileOptional("DifficultyList","DifficultyList");
t[#t+1] = StandardDecorationFromFileOptional("CourseContentsList","CourseContentsList");
t[#t+1] = StandardDecorationFromFileOptional("BPMDisplay","BPMDisplay");
t[#t+1] = StandardDecorationFromFileOptional("BPMLabel","BPMLabel");
t[#t+1] = StandardDecorationFromFileOptional("SegmentDisplay","SegmentDisplay");

t[#t+1] = StandardDecorationFromFileOptional("SongTime","SongTime") .. {
	SetCommand=function(self)
		local curSelection = nil;
		local length = 0.0;
		if GAMESTATE:IsCourseMode() then
			curSelection = GAMESTATE:GetCurrentCourse();
			self:playcommand("Reset");
			if curSelection then
				local trail = GAMESTATE:GetCurrentTrail(GAMESTATE:GetMasterPlayerNumber());
				if trail then
					length = TrailUtil.GetTotalSeconds(trail);
				else
					length = 0.0;
				end;
			else
				length = 0.0;
			end;
		else
			curSelection = GAMESTATE:GetCurrentSong();
			self:playcommand("Reset");
			if curSelection then
				length = curSelection:MusicLengthSeconds();
				if curSelection:IsLong() then
					self:playcommand("Long");
				elseif curSelection:IsMarathon() then
					self:playcommand("Marathon");
				else
					self:playcommand("Reset");
				end
			else
				length = 0.0;
				self:playcommand("Reset");
			end;
		end;
		self:settext( SecondsToMSS(length) );
	end;
	CurrentSongChangedMessageCommand=cmd(playcommand,"Set");
	CurrentCourseChangedMessageCommand=cmd(playcommand,"Set");
	CurrentTrailP1ChangedMessageCommand=cmd(playcommand,"Set");
	CurrentTrailP2ChangedMessageCommand=cmd(playcommand,"Set");
}

if not GAMESTATE:IsCourseMode() then
	t[#t+1] = StandardDecorationFromFileOptional("NewSong","NewSong") .. {
	-- 	ShowCommand=THEME:GetMetric(Var "LoadingScreen", "NewSongShowCommand" );
	-- 	HideCommand=THEME:GetMetric(Var "LoadingScreen", "NewSongHideCommand" );
		InitCommand=cmd(playcommand,"Set");
		BeginCommand=cmd(playcommand,"Set");
		CurrentSongChangedMessageCommand=cmd(playcommand,"Set");
		SetCommand=function(self)
	-- 		local pTargetProfile;
			local sSong;
			-- Start!
			if GAMESTATE:GetCurrentSong() then
				if PROFILEMAN:IsSongNew(GAMESTATE:GetCurrentSong()) then
					self:playcommand("Show");
				else
					self:playcommand("Hide");
				end
			else
				self:playcommand("Hide");
			end
		end;
	};
	t[#t+1] = StandardDecorationFromFileOptional("StageDisplay","StageDisplay");
end;

if GAMESTATE:IsCourseMode() then
	t[#t+1] = StandardDecorationFromFileOptional("NumCourseSongs","NumCourseSongs")..{
		InitCommand=cmd(horizalign,right);
		SetCommand=function(self)
			local curSelection= nil;
			local sAppend = "";
			if GAMESTATE:IsCourseMode() then
				curSelection = GAMESTATE:GetCurrentCourse();
				if curSelection then
					sAppend = (curSelection:GetEstimatedNumStages() == 1) and "Stage" or "Stages";
					self:visible(true);
					self:settext( curSelection:GetEstimatedNumStages() .. " " .. sAppend);
				else
					self:visible(false);
				end;
			else
				self:visible(false);
			end;
		end;
		CurrentCourseChangedMessageCommand=cmd(playcommand,"Set");
	};
end

t[#t+1] = StandardDecorationFromFileOptional("DifficultyDisplay","DifficultyDisplay");
t[#t+1] = StandardDecorationFromFileOptional("SortOrderFrame","SortOrderFrame") .. {
--[[ 	BeginCommand=cmd(playcommand,"Set");
	SortOrderChangedMessageCommand=cmd(playcommand,"Set";);
	SetCommand=function(self)
		local s = SortOrderToLocalizedString( GAMESTATE:GetSortOrder() );
		self:settext( s );
		self:playcommand("Sort");
	end; --]]
};
t[#t+1] = StandardDecorationFromFileOptional("SortOrder","SortOrderText") .. {
	BeginCommand=cmd(playcommand,"Set");
	SortOrderChangedMessageCommand=cmd(playcommand,"Set";);
	SetCommand=function(self)
		local s = SortOrderToLocalizedString( GAMESTATE:GetSortOrder() );
		self:settext( s );
		self:playcommand("Sort");
	end;
};
t[#t+1] = StandardDecorationFromFileOptional("SongOptionsFrame","SongOptionsFrame") .. {
	ShowPressStartForOptionsCommand=THEME:GetMetric(Var "LoadingScreen","SongOptionsFrameShowCommand");
	ShowEnteringOptionsCommand=THEME:GetMetric(Var "LoadingScreen","SongOptionsFrameEnterCommand");
	HidePressStartForOptionsCommand=THEME:GetMetric(Var "LoadingScreen","SongOptionsFrameHideCommand");
};
t[#t+1] = StandardDecorationFromFileOptional("SongOptions","SongOptionsText") .. {
	ShowPressStartForOptionsCommand=THEME:GetMetric(Var "LoadingScreen","SongOptionsShowCommand");
	ShowEnteringOptionsCommand=THEME:GetMetric(Var "LoadingScreen","SongOptionsEnterCommand");
	HidePressStartForOptionsCommand=THEME:GetMetric(Var "LoadingScreen","SongOptionsHideCommand");
};
-- Sounds
t[#t+1] = Def.ActorFrame {
	LoadActor(THEME:GetPathS("_switch","up")) .. {
		SelectMenuOpenedMessageCommand=cmd(stop;play);
	};
	LoadActor(THEME:GetPathS("_switch","down")) .. {
		SelectMenuClosedMessageCommand=cmd(stop;play);
	};
};

-- Decorations
t[#t+1] = Def.ActorFrame{
	InitCommand=cmd(y,SCREEN_TOP+120;);
	LoadActor( "_cover1" )..{
		InitCommand=cmd(x,SCREEN_CENTER_X-20;y,SCREEN_CENTER_Y-120;);
		OnCommand=cmd(diffusealpha,0;addx,20;zoomx,0.5;zoomy,0.5;sleep,0.15;accelerate,0.2;diffusealpha,1;addx,-20;zoomx,0.5;linear,0.1;zoomy,0.5;);
	};
};

t[#t+1] = Def.ActorFrame{
	InitCommand=cmd(y,SCREEN_TOP+120;);
	LoadActor( "_groove" )..{
		InitCommand=cmd(x,SCREEN_CENTER_X+325;y,SCREEN_CENTER_Y+12;);
		OnCommand=cmd(diffusealpha,1;zoomy,0.148;zoomx,0.154;);
	};
};



t[#t+1] = LoadFont("_exo Bold 15px") .. { 
          InitCommand=cmd(x,SCREEN_CENTER_X+124;y,SCREEN_CENTER_Y+32;shadowlength,1;shadowcolor,color("#000000");diffuse,color("#FFFFFF");zoomx,0.7;zoomy,0.8;); 
          CurrentSongChangedMessageCommand=cmd(playcommand,"Set"); 
		  OnCommand=cmd(maxwidth,256;playcommand,"Set"); 
		  OffCommand=cmd(accelerate,0.2;diffusealpha,0;);
          SetCommand=function(self) 
               local group = GAMESTATE:GetCurrentSong(); 
               if group then 
                    self:settext(group:GetGroupName()); 
                    self:playcommand("Refresh");
				else
					self:settext("");
					self:playcommand("Refresh"); 	
               end
          end;
};


t[#t+1] = Def.ActorFrame{
	InitCommand=cmd(y,SCREEN_TOP;);
	LoadActor( "gametype" )..{
		InitCommand=cmd(x,SCREEN_CENTER_X+280;y,SCREEN_CENTER_Y+5;);
		OnCommand=cmd(draworder,205;diffusealpha,1;zoom,0.4;);
	};
};

t[#t+1] = Def.ActorFrame{
	InitCommand=cmd(y,SCREEN_TOP;);
	LoadActor( "grooveradar" )..{
		InitCommand=cmd(x,SCREEN_CENTER_X+267;y,SCREEN_CENTER_Y+60;);
		OnCommand=cmd(draworder,205;diffusealpha,1;zoomy,0.25;zoomx,0.2;);
	};
};

t[#t+1] = LoadFont("_exo Bold 15px") .. { 
          InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y-21;horizalign,center;horizalign,center;shadowlength,1;shadowcolor,color("#000000");diffuse,color("#BFC8DD");zoom,0.75;); 
          CurrentSongChangedMessageCommand=cmd(playcommand,"Set"); 
          CurrentCourseChangedMessageCommand=cmd(playcommand,"Set"); 
          ChangedLanguageDisplayMessageCommand=cmd(playcommand,"Set"); 
		  OffCommand=cmd(accelerate,0.2;diffusealpha,0;);
          SetCommand=function(self) 
               local song = GAMESTATE:GetCurrentSong() or GAMESTATE:GetCurrentCourse(); 
               if song then 
                    self:settext(song:GetDisplayFullTitle()); 
                    self:playcommand("Refresh");
				else
					self:settext("");
					self:playcommand("Refresh"); 	
               end 
          end; 
};

t[#t+1] = LoadFont("Common Normal") .. { 
          InitCommand=cmd(x,SCREEN_CENTER_X+330;y,SCREEN_CENTER_Y+5;horizalign,left;horizalign,left;shadowlength,1;shadowcolor,color("#000000");diffuse,color("#FFFFFF");zoomy,0.95;zoomx,0.85;); 
          OnCommand=cmd(playcommand,"Set"); 
		  OffCommand=cmd(accelerate,0.2;diffusealpha,0;);
          SetCommand=function(self) 
               local game = GAMESTATE:GetCurrentGame(); 
               if game then 
                    self:settext(game:GetName()); 
                    self:playcommand("Refresh");
				else
					self:settext("");
					self:playcommand("Refresh"); 	
               end
          end;
};

t[#t+1] = LoadFont("Common Normal") .. { 
          InitCommand=cmd(x,SCREEN_CENTER_X+32;y,SCREEN_CENTER_Y+70;draworder,300;shadowlength,1;shadowcolor,color("#000000");diffuse,color("#FFFFFF");zoom,0.6;); 
          CurrentSongChangedMessageCommand=cmd(playcommand,"Set"); 
		  CurrentStepsP1ChangedMessageCommand=cmd(playcommand,"Set");
		  OnCommand=cmd(maxwidth,305;horizalign,left;playcommand,"Set"); 
		  OffCommand=cmd(accelerate,0.2;diffusealpha,0;);
          SetCommand=function(self) 
               local chart = GAMESTATE:GetCurrentSteps('PlayerNumber_P1',0); 
			   
               if chart then 
                    self:settext(chart:GetAuthorCredit()); 
                    self:playcommand("Refresh");
				else
					self:settext("");
					self:playcommand("Refresh"); 	
               end
          end;
};

t[#t+1] = LoadFont("Common Normal") .. { 
          InitCommand=cmd(x,SCREEN_CENTER_X+217;y,SCREEN_CENTER_Y+90;draworder,300;shadowlength,1;shadowcolor,color("#000000");diffuse,color("#FFFFFF");zoom,0.6;); 
          CurrentSongChangedMessageCommand=cmd(playcommand,"Set"); 
		  CurrentStepsP2ChangedMessageCommand=cmd(playcommand,"Set");
		  OnCommand=cmd(maxwidth,305;horizalign,right;playcommand,"Set"); 
		  OffCommand=cmd(accelerate,0.2;diffusealpha,0;);
          SetCommand=function(self) 
               local chart = GAMESTATE:GetCurrentSteps('PlayerNumber_P2',1); 
			   
               if chart then 
                    self:settext(chart:GetAuthorCredit()); 
                    self:playcommand("Refresh");
				else
					self:settext("");
					self:playcommand("Refresh"); 	
               end
          end;
};

t[#t+1] = Def.ActorFrame{
	InitCommand=cmd(y,SCREEN_TOP+120);
	LoadActor( "autorline" )..{
		InitCommand=cmd(x,SCREEN_CENTER_X+124.55;y,SCREEN_CENTER_Y-50;);
		OnCommand=cmd(draworder,205;zoomy,0.7;zoomx,1.0035);
		OffCommand=cmd(zoom,0;decelerate,1;zoom,0);
	};
};

--P2 Autorline

t[#t+1] = Def.ActorFrame{
	InitCommand=cmd(y,SCREEN_TOP+120);
	LoadActor( "autorline" )..{
		InitCommand=cmd(x,SCREEN_CENTER_X+124.55;y,SCREEN_CENTER_Y-30;);
		OnCommand=cmd(draworder,205;zoomy,0.7;zoomx,1.0035);
		OffCommand=cmd(zoom,0;decelerate,1;zoom,0);
	};
};

t[#t+1] = Def.ActorFrame{
	InitCommand=cmd(y,SCREEN_TOP+120);
	LoadActor( "_autorline_p1" )..{
		InitCommand=cmd(x,SCREEN_CENTER_X+62;y,SCREEN_CENTER_Y-63;);
		OnCommand=cmd(draworder,205;zoom,0.4);
		OffCommand=cmd(zoom,0;decelerate,1;zoom,0);
	};
};

t[#t+1] = Def.ActorFrame{
	InitCommand=cmd(y,SCREEN_TOP+120);
	LoadActor( "_autorline_p2" )..{
		InitCommand=cmd(x,SCREEN_CENTER_X+185;y,SCREEN_CENTER_Y-15;);
		OnCommand=cmd(draworder,205;zoom,0.4);
		OffCommand=cmd(zoom,0;decelerate,1;zoom,0);
	};
};

t[#t+1] = Def.ActorFrame{
	LoadActor("players_stats")..{
		InitCommand=cmd(y,SCREEN_TOP+7);
	};
};

t[#t+1] = Def.ActorFrame{
	LoadActor("../_Headers/_SelectMusic")..{
		InitCommand=cmd(x,SCREEN_CENTER_X-205;y,SCREEN_CENTER_Y-225;draworder,1;);
		OnCommand=cmd(zoom,0.6);
	};
};

--DANCE STUFFS

t[#t+1] = Def.ActorFrame{
	LoadActor("../ScreenTitleMenu decorations/dancelogo")..{
		InitCommand=cmd(x,SCREEN_CENTER_X+325;y,SCREEN_CENTER_Y+32;visible,GAMESTATE:GetCurrentGame():GetName() == "dance");
		OnCommand=cmd(zoom,0.3);
	};
};

t[#t+1] = Def.ActorFrame{
	LoadActor("dance-single-p1")..{
		InitCommand=cmd(x,SCREEN_CENTER_X+330;y,SCREEN_CENTER_Y-222;draworder,-1;visible,GAMESTATE:GetCurrentGame():GetName() == "dance" and GAMESTATE:GetCurrentStyle():GetName() == "single" and GAMESTATE:IsHumanPlayer(PLAYER_1));
		OnCommand=cmd(zoom,0.13);
	};
};

t[#t+1] = Def.ActorFrame{
	LoadActor("dance-single-p2")..{
		InitCommand=cmd(x,SCREEN_CENTER_X+330;y,SCREEN_CENTER_Y-222;draworder,-1;visible,GAMESTATE:GetCurrentGame():GetName() == "dance" and GAMESTATE:GetCurrentStyle():GetName() == "single" and GAMESTATE:IsHumanPlayer(PLAYER_2));
		OnCommand=cmd(zoom,0.13);
	};
};

t[#t+1] = Def.ActorFrame{
	LoadActor("dance-versus")..{
		InitCommand=cmd(x,SCREEN_CENTER_X+330;y,SCREEN_CENTER_Y-222;draworder,1;visible,GAMESTATE:GetCurrentGame():GetName() == "dance" and GAMESTATE:GetCurrentStyle():GetName() == "versus");
		OnCommand=cmd(zoom,0.13);
	};
};

t[#t+1] = Def.ActorFrame{
	LoadActor("dance-double")..{
		InitCommand=cmd(x,SCREEN_CENTER_X+330;y,SCREEN_CENTER_Y-222;draworder,1;visible,GAMESTATE:GetCurrentGame():GetName() == "dance" and GAMESTATE:GetCurrentStyle():GetName() == "double");
		OnCommand=cmd(zoom,0.13);
	};
};

t[#t+1] = Def.ActorFrame{
	LoadActor("dance-threepanel-p1")..{
		InitCommand=cmd(x,SCREEN_CENTER_X+330;y,SCREEN_CENTER_Y-222;draworder,1;visible,GAMESTATE:GetCurrentGame():GetName() == "dance" and GAMESTATE:GetCurrentStyle():GetName() == "threepanel" and GAMESTATE:IsHumanPlayer(PLAYER_1));
		OnCommand=cmd(zoom,0.13);
	};
};

t[#t+1] = Def.ActorFrame{
	LoadActor("dance-threepanel-p2")..{
		InitCommand=cmd(x,SCREEN_CENTER_X+330;y,SCREEN_CENTER_Y-222;draworder,1;visible,GAMESTATE:GetCurrentGame():GetName() == "dance" and GAMESTATE:GetCurrentStyle():GetName() == "threepanel" and GAMESTATE:IsHumanPlayer(PLAYER_2));
		OnCommand=cmd(zoom,0.13);
	};
};

t[#t+1] = Def.ActorFrame{
	LoadActor("dance-solo-p1")..{
		InitCommand=cmd(x,SCREEN_CENTER_X+330;y,SCREEN_CENTER_Y-222;draworder,1;visible,GAMESTATE:GetCurrentGame():GetName() == "dance" and GAMESTATE:GetCurrentStyle():GetName() == "solo" and GAMESTATE:IsHumanPlayer(PLAYER_1));
		OnCommand=cmd(zoom,0.13);
	};
};

t[#t+1] = Def.ActorFrame{
	LoadActor("dance-solo-p2")..{
		InitCommand=cmd(x,SCREEN_CENTER_X+330;y,SCREEN_CENTER_Y-222;draworder,1;visible,GAMESTATE:GetCurrentGame():GetName() == "dance" and GAMESTATE:GetCurrentStyle():GetName() == "solo" and GAMESTATE:IsHumanPlayer(PLAYER_2));
		OnCommand=cmd(zoom,0.13);
	};
};

t[#t+1] = Def.ActorFrame{
	LoadActor("dance-routine")..{
		InitCommand=cmd(x,SCREEN_CENTER_X+330;y,SCREEN_CENTER_Y-222;draworder,1;visible,GAMESTATE:GetCurrentGame():GetName() == "dance" and GAMESTATE:GetCurrentStyle():GetName() == "routine");
		OnCommand=cmd(zoom,0.13);
	};
};

--PUMP STUFFS

t[#t+1] = Def.ActorFrame{
	LoadActor("../ScreenTitleMenu decorations/pumplogo")..{
		InitCommand=cmd(x,SCREEN_CENTER_X+325;y,SCREEN_CENTER_Y+32;visible,GAMESTATE:GetCurrentGame():GetName() == "pump");
		OnCommand=cmd(zoom,0.3);
	};
};

t[#t+1] = Def.ActorFrame{
	LoadActor("pump-single-p1")..{
		InitCommand=cmd(x,SCREEN_CENTER_X+330;y,SCREEN_CENTER_Y-222;draworder,1;visible,GAMESTATE:GetCurrentGame():GetName() == "pump" and GAMESTATE:GetCurrentStyle():GetName() == "single" and GAMESTATE:IsHumanPlayer(PLAYER_1));
		OnCommand=cmd(zoom,0.13);
	};
};

t[#t+1] = Def.ActorFrame{
	LoadActor("pump-single-p2")..{
		InitCommand=cmd(x,SCREEN_CENTER_X+330;y,SCREEN_CENTER_Y-222;draworder,1;visible,GAMESTATE:GetCurrentGame():GetName() == "pump" and GAMESTATE:GetCurrentStyle():GetName() == "single" and GAMESTATE:IsHumanPlayer(PLAYER_2));
		OnCommand=cmd(zoom,0.13);
	};
};

t[#t+1] = Def.ActorFrame{
	LoadActor("pump-double")..{
		InitCommand=cmd(x,SCREEN_CENTER_X+330;y,SCREEN_CENTER_Y-222;draworder,1;visible,GAMESTATE:GetCurrentGame():GetName() == "pump" and GAMESTATE:GetCurrentStyle():GetName() == "double");
		OnCommand=cmd(zoom,0.13);
	};
};

t[#t+1] = Def.ActorFrame{
	LoadActor("pump-halfdouble")..{
		InitCommand=cmd(x,SCREEN_CENTER_X+330;y,SCREEN_CENTER_Y-222;draworder,1;visible,GAMESTATE:GetCurrentGame():GetName() == "pump" and GAMESTATE:GetCurrentStyle():GetName() == "halfdouble");
		OnCommand=cmd(zoom,0.13);
	};
};

t[#t+1] = Def.ActorFrame{
	LoadActor("pump-versus")..{
		InitCommand=cmd(x,SCREEN_CENTER_X+330;y,SCREEN_CENTER_Y-222;draworder,1;visible,GAMESTATE:GetCurrentGame():GetName() == "pump" and GAMESTATE:GetCurrentStyle():GetName() == "versus");
		OnCommand=cmd(zoom,0.13);
	};
};

t[#t+1] = Def.ActorFrame{
	LoadActor("pump-routine")..{
		InitCommand=cmd(x,SCREEN_CENTER_X+330;y,SCREEN_CENTER_Y-222;draworder,1;visible,GAMESTATE:GetCurrentGame():GetName() == "pump" and GAMESTATE:GetCurrentStyle():GetName() == "routine");
		OnCommand=cmd(zoom,0.13);
	};
};

--TECHNO STUFFS

t[#t+1] = Def.ActorFrame{
	LoadActor("../ScreenTitleMenu decorations/technologo")..{
		InitCommand=cmd(x,SCREEN_CENTER_X+325;y,SCREEN_CENTER_Y+32;visible,GAMESTATE:GetCurrentGame():GetName() == "techno");
		OnCommand=cmd(zoom,0.3);
	};
};

t[#t+1] = Def.ActorFrame{
	LoadActor("dance-single-p1")..{
		InitCommand=cmd(x,SCREEN_CENTER_X+330;y,SCREEN_CENTER_Y-222;draworder,-1;visible,GAMESTATE:GetCurrentGame():GetName() == "techno" and GAMESTATE:GetCurrentStyle():GetName() == "single4" and GAMESTATE:IsHumanPlayer(PLAYER_1));
		OnCommand=cmd(zoom,0.13);
	};
};

t[#t+1] = Def.ActorFrame{
	LoadActor("dance-single-p2")..{
		InitCommand=cmd(x,SCREEN_CENTER_X+330;y,SCREEN_CENTER_Y-222;draworder,-1;visible,GAMESTATE:GetCurrentGame():GetName() == "techno" and GAMESTATE:GetCurrentStyle():GetName() == "single4" and GAMESTATE:IsHumanPlayer(PLAYER_2));
		OnCommand=cmd(zoom,0.13);
	};
};

t[#t+1] = Def.ActorFrame{
	LoadActor("pump-single-p1")..{
		InitCommand=cmd(x,SCREEN_CENTER_X+330;y,SCREEN_CENTER_Y-222;draworder,-1;visible,GAMESTATE:GetCurrentGame():GetName() == "techno" and GAMESTATE:GetCurrentStyle():GetName() == "single5" and GAMESTATE:IsHumanPlayer(PLAYER_1));
		OnCommand=cmd(zoom,0.13);
	};
};

t[#t+1] = Def.ActorFrame{
	LoadActor("pump-single-p2")..{
		InitCommand=cmd(x,SCREEN_CENTER_X+330;y,SCREEN_CENTER_Y-222;draworder,-1;visible,GAMESTATE:GetCurrentGame():GetName() == "techno" and GAMESTATE:GetCurrentStyle():GetName() == "single5" and GAMESTATE:IsHumanPlayer(PLAYER_2));
		OnCommand=cmd(zoom,0.13);
	};
};

t[#t+1] = Def.ActorFrame{
	LoadActor("techno-single8-p1")..{
		InitCommand=cmd(x,SCREEN_CENTER_X+330;y,SCREEN_CENTER_Y-222;draworder,-1;visible,GAMESTATE:GetCurrentGame():GetName() == "techno" and GAMESTATE:GetCurrentStyle():GetName() == "single8" and GAMESTATE:IsHumanPlayer(PLAYER_1));
		OnCommand=cmd(zoom,0.13);
	};
};

t[#t+1] = Def.ActorFrame{
	LoadActor("techno-single8-p2")..{
		InitCommand=cmd(x,SCREEN_CENTER_X+330;y,SCREEN_CENTER_Y-222;draworder,-1;visible,GAMESTATE:GetCurrentGame():GetName() == "techno" and GAMESTATE:GetCurrentStyle():GetName() == "single8" and GAMESTATE:IsHumanPlayer(PLAYER_2));
		OnCommand=cmd(zoom,0.13);
	};
};

t[#t+1] = Def.ActorFrame{
	LoadActor("dance-double")..{
		InitCommand=cmd(x,SCREEN_CENTER_X+330;y,SCREEN_CENTER_Y-222;draworder,1;visible,GAMESTATE:GetCurrentGame():GetName() == "techno" and GAMESTATE:GetCurrentStyle():GetName() == "double4");
		OnCommand=cmd(zoom,0.13);
	};
};

t[#t+1] = Def.ActorFrame{
	LoadActor("pump-double")..{
		InitCommand=cmd(x,SCREEN_CENTER_X+330;y,SCREEN_CENTER_Y-222;draworder,1;visible,GAMESTATE:GetCurrentGame():GetName() == "techno" and GAMESTATE:GetCurrentStyle():GetName() == "double5");
		OnCommand=cmd(zoom,0.13);
	};
};

t[#t+1] = Def.ActorFrame{
	LoadActor("techno-double8")..{
		InitCommand=cmd(x,SCREEN_CENTER_X+330;y,SCREEN_CENTER_Y-222;draworder,-1;visible,GAMESTATE:GetCurrentGame():GetName() == "techno" and GAMESTATE:GetCurrentStyle():GetName() == "double8");
		OnCommand=cmd(zoom,0.13);
	};
};

t[#t+1] = Def.ActorFrame{
	LoadActor("dance-versus")..{
		InitCommand=cmd(x,SCREEN_CENTER_X+330;y,SCREEN_CENTER_Y-222;draworder,1;visible,GAMESTATE:GetCurrentGame():GetName() == "techno" and GAMESTATE:GetCurrentStyle():GetName() == "versus4");
		OnCommand=cmd(zoom,0.13);
	};
};

t[#t+1] = Def.ActorFrame{
	LoadActor("pump-versus")..{
		InitCommand=cmd(x,SCREEN_CENTER_X+330;y,SCREEN_CENTER_Y-222;draworder,1;visible,GAMESTATE:GetCurrentGame():GetName() == "techno" and GAMESTATE:GetCurrentStyle():GetName() == "versus5");
		OnCommand=cmd(zoom,0.13);
	};
};

t[#t+1] = Def.ActorFrame{
	LoadActor("techno-versus8")..{
		InitCommand=cmd(x,SCREEN_CENTER_X+330;y,SCREEN_CENTER_Y-222;draworder,1;visible,GAMESTATE:GetCurrentGame():GetName() == "techno" and GAMESTATE:GetCurrentStyle():GetName() == "versus8");
		OnCommand=cmd(zoom,0.13);
	};
};

--KB7 STUFFS

t[#t+1] = Def.ActorFrame{
	LoadActor("../ScreenTitleMenu decorations/kb7logo")..{
		InitCommand=cmd(x,SCREEN_CENTER_X+325;y,SCREEN_CENTER_Y+32;visible,GAMESTATE:GetCurrentGame():GetName() == "kb7");
		OnCommand=cmd(zoom,0.3);
	};
};

t[#t+1] = Def.ActorFrame{
	LoadActor("kb7-single-p1")..{
		InitCommand=cmd(x,SCREEN_CENTER_X+330;y,SCREEN_CENTER_Y-222;draworder,1;visible,GAMESTATE:GetCurrentGame():GetName() == "kb7" and GAMESTATE:GetCurrentStyle():GetName() == "single" and GAMESTATE:IsHumanPlayer(PLAYER_1));
		OnCommand=cmd(zoom,0.13);
	};
};

t[#t+1] = Def.ActorFrame{
	LoadActor("kb7-single-p2")..{
		InitCommand=cmd(x,SCREEN_CENTER_X+330;y,SCREEN_CENTER_Y-222;draworder,1;visible,GAMESTATE:GetCurrentGame():GetName() == "kb7" and GAMESTATE:GetCurrentStyle():GetName() == "single" and GAMESTATE:IsHumanPlayer(PLAYER_2));
		OnCommand=cmd(zoom,0.13);
	};
};

--POPN STUFFS

t[#t+1] = Def.ActorFrame{
	LoadActor("../ScreenTitleMenu decorations/popnlogo")..{
		InitCommand=cmd(x,SCREEN_CENTER_X+325;y,SCREEN_CENTER_Y+32;visible,GAMESTATE:GetCurrentGame():GetName() == "popn");
		OnCommand=cmd(zoomx,0.3;zoomy,0.25);
	};
};

t[#t+1] = Def.ActorFrame{
	LoadActor("popn-five")..{
		InitCommand=cmd(x,SCREEN_CENTER_X+330;y,SCREEN_CENTER_Y-222;draworder,1;visible,GAMESTATE:GetCurrentGame():GetName() == "popn" and GAMESTATE:GetCurrentStyle():GetName() == "popn-five");
		OnCommand=cmd(zoom,0.16);
	};
};

t[#t+1] = Def.ActorFrame{
	LoadActor("popn-nine")..{
		InitCommand=cmd(x,SCREEN_CENTER_X+330;y,SCREEN_CENTER_Y-222;draworder,1;visible,GAMESTATE:GetCurrentGame():GetName() == "popn" and GAMESTATE:GetCurrentStyle():GetName() == "popn-nine");
		OnCommand=cmd(zoom,0.16);
	};
};

--POPN STUFFS

t[#t+1] = Def.ActorFrame{
	LoadActor("../ScreenTitleMenu decorations/beatlogo")..{
		InitCommand=cmd(x,SCREEN_CENTER_X+325;y,SCREEN_CENTER_Y+32;visible,GAMESTATE:GetCurrentGame():GetName() == "beat");
		OnCommand=cmd(zoomy,0.3;zoomx,0.25);
	};
};

return t